/*    */
package org.ly.uap.client.validation;
/*    */
/*    */

import javax.servlet.FilterConfig;
/*    */ import javax.servlet.ServletException;
/*    */ import org.apache.commons.logging.Log;

public final class Saml11TicketValidationFilter extends AbstractTicketValidationFilter {
    public Saml11TicketValidationFilter() {
        setArtifactParameterName("SAMLart");
        setServiceParameterName("TARGET");
    }

    protected void initInternal(FilterConfig filterConfig) throws ServletException {
        super.initInternal(filterConfig);

        this.log.warn("SAML1.1 compliance requires the [artifactParameterName] and [serviceParameterName] to be set to specified values.");
        this.log.warn("This filter will overwrite any user-provided values (if any are provided)");

        setArtifactParameterName("SAMLart");
        setServiceParameterName("TARGET");
    }

    protected final TicketValidator getTicketValidator(FilterConfig filterConfig) {
//        Saml11TicketValidator validator = new Saml11TicketValidator(getPropertyFromInitParams(filterConfig, "casServerUrlPrefix", null));
//        String tolerance = getPropertyFromInitParams(filterConfig, "tolerance", "1000");
//        validator.setTolerance(Long.parseLong(tolerance));
//        validator.setRenew(parseBoolean(getPropertyFromInitParams(filterConfig, "renew", "false")));
//        validator.setHostnameVerifier(getHostnameVerifier(filterConfig));
//        validator.setEncoding(getPropertyFromInitParams(filterConfig, "encoding", null));
//        validator.setDisableXmlSchemaValidation(parseBoolean(getPropertyFromInitParams(filterConfig, "disableXmlSchemaValidation", "false")));
//        return validator;
        return null;
    }
}
